package com.iap.client.context
{
	import com.iap.admin.command.LoginCommand;
	import com.iap.admin.service.ILoginService;
	import com.iap.admin.service.LoginService;
	import com.iap.admin.signal.LoginRequestSignal;
	import com.iap.admin.view.AdminView;
	import com.iap.app.data.AppData;
	import com.iap.app.data.IAppData;
	import com.iap.client.mediator.MainMediator;
	import com.iap.client.mediator.MainMenuMediator;
	import com.iap.client.view.ClientView;
	import com.iap.client.view.MainMenuView;
	import com.iap.client.view.MainView;
	import com.iap.report.view.ReportView;
	
	import org.robotlegs.mvcs.SignalContext;

	public class MainContext extends SignalContext
	{
		override public function startup():void
		{
			injector.mapSingletonOf(ILoginService, LoginService);
			injector.mapSingletonOf(IAppData, AppData);
			injector.mapSingleton(MainView);
			injector.mapSingleton(MainMenuView);

			signalCommandMap.mapSignalClass(LoginRequestSignal, LoginCommand);

			mediatorMap.mapView(MainView, MainMediator);
			mediatorMap.mapView(MainMenuView, MainMenuMediator);
			mediatorMap.mapView(AdminView, MainMenuMediator);
			mediatorMap.mapView(ClientView, MainMenuMediator);
			mediatorMap.mapView(ReportView, MainMenuMediator);
		}
	}
}